<!doctype html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, shrink-to-fit=no" />
    <meta name="renderer" content="webkit" />
    <meta name="force-rendering" content="webkit" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <link rel="Shortcut Icon" href="/static/favicon.ico" type="image/x-icon" />
    <link rel="stylesheet" href="/static/css/mdui.css" />
    {% block css %}{% endblock %}
    <title>{% block title %}{% endblock %}</title>
</head>

<body id="body" class="mdui-appbar-with-toolbar mdui-theme-primary-blue">
    <div id="appbar" class="mdui-appbar mdui-appbar-fixed mdui-shadow-0">
        <div id="toolbar" class="mdui-toolbar mdui-color-org mdui-text-color-white">
            {% block tools %}
            <button class="mdui-btn mdui-btn-icon mdui-btn-dense mdui-color-theme-accent mdui-ripple"
                mdui-drawer="{target: '#drawer'}"><i class="mdui-icon material-icons">menu</i></button>
            {% endblock %}
        </div>
    </div>
    <div class="mdui-drawer mdui-drawer-close" id="drawer">
        <ul class="mdui-list">
            <li class="mdui-subheader">开始</li>
            <li class="mdui-list-item mdui-ripple">
                <i class="mdui-list-item-icon mdui-icon material-icons mdui-text-color-orange">apps</i>
                <div class="mdui-list-item-content">Apps</div>
            </li>
            {% block drawer %}
            {% endblock %}
        </ul>
    </div>
    <div id="org" style="overflow: scroll;">
        {% block org %}{% endblock %}
    </div>


    <script src="/static/js/mdui.js"></script>
    <script src="/static/js/func.js"></script>
    <script src="/static/js/cookies.js"></script>
    <script>
        function GetHeight() {
            var winHeight = 0;
            if (window.innerHeight) {
                winHeight = window.innerHeight;
            }
            else if ((document.body) && (document.body.clientHeight)) {
                winHeight = document.body.clientHeight;
            }
            if (document.documentElement && document.documentElement.clientHeight) {
                winHeight = document.documentElement.clientHeight;
            }
            return winHeight
        }
        function GetWidth() {
            var winWidth = 0;
            if (window.innerWidth) {
                winWidth = window.innerWidth;
            }
            else if ((document.body) && (document.body.clientWidth)) {
                winWidth = document.body.clientWidth;
            }
            if (document.documentElement && document.documentElement.clientWidth) {
                winWidth = document.documentElement.clientWidth;
            }
            return winWidth
        }
        function AutoHeight(id, length) {
            winHeight = GetHeight() - length;
            document.getElementById(id).style.height = winHeight + "px";
        }
        function AutoWidth(id, length) {
            winWidth = GetWidth() - length;
            document.getElementById(id).style.width = winWidth + "px";
        }
        function AutoHei() {
            AutoHeight("org", 48);
        }
        AutoHei();
        window.onresize = AutoHei;
    </script>
    {% block scr %}{% endblock %}
</body>

</html>